package com.bwsoft.admin.domain;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

/**
 * 资讯类别POJO
 *
 * @author Yan Bingda
 */
@Entity
@Table(name = "ne_news_category")
public class NewsCategory implements Serializable {

	private static final long serialVersionUID = 8824743509387443826L;
	@Id
	@Column(name = "id")
	@GenericGenerator(name = "idGenerator", strategy = "identity")
	@GeneratedValue(generator = "idGenerator")
	private Integer id;
	private String name;
	private boolean status;
	@Column(name="c_order")
	private Integer order;
	@OneToMany(mappedBy = "category", fetch = FetchType.LAZY, targetEntity = News.class)
	private Set<News> news = new HashSet<News>();
	
	
	
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public boolean isStatus() {
		return status;
	}
	public void setStatus(boolean status) {
		this.status = status;
	}
	public Integer getOrder() {
		return order;
	}
	public void setOrder(Integer order) {
		this.order = order;
	}
	public Set<News> getNews() {
		return news;
	}
	public void setNews(Set<News> news) {
		this.news = news;
	}
}
